1. Field of the Invention
The present invention relates to a method and associated apparatus for encoding an analog signal into a digital form and for decoding the digital signal back into an analog form, wherein the encoding and decoding are performed in such a way as to maximize the useful dynamic range of the signal when used for encoding and decoding an audio signal.
2. Description of the Related Art
Digital encoding of analog signals is usually accomplished by what is called a "linear" conversion, in which a simple direct binary value equal to the analog value to be encoded is generated. For example, an 8 bit digital system would encode all input analog signal values into one of 256 values linearly related to the input analog value. The conversion of the input analog signal into its binary representation is accomplished by sampling the analog signal at a rate equal to at least twice the rate of the highest frequency component to be encoded within the analog signal, and converting the sampled analog values to the nearest digital representation. Because of the finite and limited number of representations possible using a binary number, the input signal is "quantized" and the representation at each sample may not accurately correspond to the associated analog value. For instance, if the encoding system is an 8 bit system, there are only 256 values possible, i.e., 0 through 255; or, more specifically in binary representation, 00000000 through 11111111. If the input analog value sampled were 128.438, for example, it would be represented by the nearest binary value, e.g., 1000000 or 128. The difference of 0.438 is an error often referred to as the "quantization error" or "quantization noise". When the analog signal being converted is an audio signal, this error is heard as noise when the signal is decoded back into its analog form. When the analog signal is large, the error represents only a small fraction of the overall signal value. When the signal is small, however, the error becomes much more significant. In fact, signals smaller than the quantization size can be lost entirely. Even for a large signal, the quantization noise will not be masked if low frequencies dominate.
One solution to this problem has been the use of nonlinear digital encoders/decoders, such as those produced by Precision Monolithics, Inc. under the trademark COMDAC. The principle of operation of the COMDAC encoders/decoders is to make the step size dependent on the signal amplitude. As a result, for small signals the quantization noise is smaller and, therefore, less objectionable. At the same time, the quantization noise for large signals is correspondingly larger, but is "masked" in the case of audio signals by the large signal itself. While the performance of the COMDAC device is acceptable for some uses, the general approach is inadequate for high fidelity audio use.
In a related patent application by the present inventor, entitled "Audio Digital/Analog Encoding and Decoding", filed Mar. 19, 1987 under Ser. No. 027,747, a system and method for reducing quantizing noise is disclosed in which an input analog signal is first pre-emphasized to accentuate its high frequency components. Samples of the signal are then taken and nonlinearly encoded to create a series of digital representations of the samples having a lower order resolution than the sample resolution. The differences between the samples and the corresponding lower order resolution digital representations are then obtained, and combined with the next sample prior to encoding. The encoded signal is then decoded in a complementary manner and converted to an analog format, followed by a complementary de-emphasis step to yield an output analog signal which closely approximates the original input signal. While this system is a distinct improvement, it still exhibits noticeable quantization noise in some circumstances.